﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Runtime.InteropServices;
using System.Windows.Forms;


namespace htmltortf
{
    class Scrool
    {
        private const int GWL_STYLE = -16;
        private const int WS_HSCROLL = 0x00100000;
        private const int WS_VSCROLL = 0x00200000;

        [DllImport("user32.dll", EntryPoint = "GetWindowLongA")]
        public static extern int GetWindowLongA(IntPtr hwnd, int nIndex);

        public static bool vsscrool(RichTextBox rtf)
        {
            int wndStyle;
            IntPtr Hdl = rtf.Handle;
            int HBar;

            int VBar;
            wndStyle = GetWindowLongA(Hdl, GWL_STYLE);

            HBar = wndStyle + WS_HSCROLL;

            VBar = wndStyle + WS_VSCROLL;
            if (VBar != 0)
            {
                return true;
            }
            else { return false; }

        }

    }
}
